home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / Include / FWNotifr.h < prev   
Encoding:
Text File  |  1995-11-08  |  2.7 KB  |  101 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWNotifr.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWNOTIFR_H
  11. #define FWNOTIFR_H
  12.  
  13. #ifndef FWRUNTYP_H
  14. #include "FWRunTyp.h"
  15. #endif
  16.  
  17. #ifndef FWINTERE_H
  18. #include "FWIntere.h"
  19. #endif
  20.  
  21. #ifndef FWORDCOL_H
  22. #include "FWOrdCol.h"
  23. #endif
  24.  
  25. #if FW_LIB_EXPORT_PRAGMAS
  26. #pragma lib_export on
  27. #endif
  28.  
  29. //========================================================================================
  30. // Foward declarations
  31. //========================================================================================
  32.  
  33. class FW_CLASS_ATTR FW_CConnection;
  34. class FW_CLASS_ATTR FW_CNotification;
  35.  
  36. //========================================================================================
  37. // CLASS FW_CPrivInterestConnectionPair
  38. //========================================================================================
  39.  
  40. class FW_CLASS_ATTR FW_CPrivInterestConnectionPair
  41. {
  42. public:
  43.                         FW_CPrivInterestConnectionPair();
  44.                         FW_CPrivInterestConnectionPair(const FW_CPrivInterestConnectionPair& pair);
  45.                         FW_CPrivInterestConnectionPair(FW_CConnection* connection,
  46.                                                        const FW_CInterest* interest);
  47.                         ~FW_CPrivInterestConnectionPair();
  48.     
  49.     FW_Boolean             operator==(const FW_CPrivInterestConnectionPair& pair) const;
  50.     FW_Boolean             operator!=(const FW_CPrivInterestConnectionPair& pair) const;
  51.     FW_CPrivInterestConnectionPair& operator=(const FW_CPrivInterestConnectionPair& pair);
  52.  
  53.     const FW_CInterest*    GetInterest() const;
  54.     FW_CConnection*        GetConnection() const;
  55.     
  56. private:
  57.     const FW_CInterest*    fInterest;
  58.     FW_CConnection*        fConnection;
  59. };
  60.  
  61. inline const FW_CInterest* FW_CPrivInterestConnectionPair::GetInterest() const
  62. {
  63.     return fInterest;
  64. }
  65.  
  66. inline FW_CConnection* FW_CPrivInterestConnectionPair::GetConnection() const
  67. {
  68.     return fConnection;
  69. }
  70.  
  71. //========================================================================================
  72. // CLASS FW_MNotifier
  73. //========================================================================================
  74.  
  75. class FW_CLASS_ATTR FW_MNotifier
  76. {
  77. public:
  78.     FW_DECLARE_CLASS
  79.  
  80.     virtual            ~ FW_MNotifier();
  81.     
  82.     virtual void        Notify(const FW_CNotification ¬ification);
  83.     
  84.     virtual void        AddConnection(FW_CConnection* connection,
  85.                                       const FW_CInterest* interest);
  86.     virtual void        RemoveConnection(const FW_CConnection& connection,
  87.                                          const FW_CInterest& interest);
  88.     
  89. protected:
  90.                         FW_MNotifier();
  91.  
  92. private:
  93.     FW_CPrivOrderedCollection    fInterestList;
  94. };
  95.  
  96. #if FW_LIB_EXPORT_PRAGMAS
  97. #pragma lib_export off
  98. #endif
  99.  
  100. #endif
  101.